<!--
  This file is a part of the open-eBackup project.
  This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0.
  If a copy of the MPL was not distributed with this file, You can obtain one at
  http://mozilla.org/MPL/2.0/.
  
  Copyright (c) [2024] Huawei Technologies Co.,Ltd.
  
  THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
  EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
  MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
  -->


<!DOCTYPE html
  PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html lang="en-us" xml:lang="en-us">
<head>
      <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
   
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="DC.Type" content="topic">
<meta name="DC.Title" content="Exiting the Cluster Safe Mode">
<meta name="DC.Format" content="XHTML">
<meta name="DC.Identifier" content="hive_00075">
<meta name="DC.Language" content="en-us">
<link rel="stylesheet" type="text/css" href="public_sys-resources/commonltr.css">
<title>Exiting the Cluster Safe Mode</title>
</head>
<body style="clear:both; padding-left:10px; padding-top:5px; padding-right:5px; padding-bottom:5px"><a name="hive_00075"></a><a name="hive_00075"></a>

<h1 class="topictitle1">Exiting the Cluster Safe Mode</h1>
<div><p id="hive_00075__en-us_topic_0000001896799592_p166081348141019">When <strong id="hive_00075__en-us_topic_0000001896799592_b1652715137136">hdfs</strong>-related commands are executed on a big data cluster node, the output "Access denied for user root. Superuser privilege is required" may be displayed. This section describes how to check whether a node is in the safe mode and exits the safe mode.</p>
<div class="section" id="hive_00075__en-us_topic_0000001896799592_section18361820141010"><h4 class="sectiontitle">Procedure</h4><ol id="hive_00075__en-us_topic_0000001896799592_ol12766194582818"><li id="hive_00075__en-us_topic_0000001896799592_li1766124516282"><span>Log in to any NameNode in the big data cluster.</span></li><li id="hive_00075__en-us_topic_0000001896799592_li1622374290"><a name="hive_00075__en-us_topic_0000001896799592_li1622374290"></a><a name="en-us_topic_0000001896799592_li1622374290"></a><span>Run the <strong id="hive_00075__en-us_topic_0000001896799592_b738311167306">ps -ef|grep -i hdfs</strong> command to check whether there is a running <strong id="hive_00075__en-us_topic_0000001896799592_b4607201871316">hdfs</strong> process. For example, if the following command output is displayed, the process exists:</span><p><pre class="screen" id="hive_00075__en-us_topic_0000001896799592_screen1657515390595">hdfs 16493 11954 2 15:19 ? 00:00:29 /usr/java/jdk1.7.0_67//bin/java -Dproc_namenode -Xmx1000m -Dhdfs.audit.logg
hdfs 16523 11954 1 15:19 ? 00:00:14 /usr/java/jdk1.7.0_67//bin/java -Dproc_secondarynamenode -Xmx1000m -Dhdfs.a</pre>
</p></li><li id="hive_00075__en-us_topic_0000001896799592_li15011227183411"><span>If output similar to <a href="#hive_00075__en-us_topic_0000001896799592_li1622374290">2</a> is displayed, run the following commands to switch to the required user and exit the safe mode:</span><p><pre class="screen" id="hive_00075__en-us_topic_0000001896799592_screen545915371053">su - hdfs</pre>
<pre class="screen" id="hive_00075__en-us_topic_0000001896799592_screen1117613587511">hdfs dfsadmin -safemode leave</pre>
</p></li></ol>
<p id="hive_00075__en-us_topic_0000001896799592_p872210459615"></p>
</div>
<p id="hive_00075__en-us_topic_0000001896799592_p8060118"></p>
</div>

<div class="hrcopyright"><hr size="2"></div><div class="hwcopyright">Copyright &copy; Huawei Technologies Co., Ltd.</div></body>
</html>